package borge.web.teamspirit.client.page.team.widgets;

import com.google.gwt.user.client.ui.Widget;

public class InputWrapper {

    private String iKey;
    private Widget iWidget;
    private boolean iMandatory;
    private Object[] iTexts;
    private Object[] iValues;
    private int iSelectedIndex;
    private int iMin = -1;
    private int iMax = -1;
    
    public InputWrapper(String aKey, Widget aWidget, boolean aMandatory){
        iKey = aKey;
        iWidget = aWidget;
        iMandatory = aMandatory;
    }
    
    public InputWrapper(String aKey, Widget aWidget, boolean aMandatory, int aMin, int aMax){
        this(aKey, aWidget, aMandatory);
        iMin = aMin;
        iMax = aMax;
    }
    
    public InputWrapper(String aKey, Object[] aTexts, Object[] aValues, 
            int aSelected, boolean aMandatory){
        iKey = aKey;
        iTexts = aTexts;
        iValues = aValues;
        iSelectedIndex = aSelected;
        iMandatory = aMandatory;
    }
    
    public String getKey(){
        return iKey;
    }
    
    public Widget getWidget()
    {
        return iWidget;
    }
    
    public void setWidget(Widget aWidget){
        iWidget = aWidget;
    }
    
    public boolean isMandatory(){
        return iMandatory;
    }
    
    public Object[] getTexts(){
        return iTexts;
    }
    
    public Object[] getValues(){
        return iValues;
    }

    public int getSelectedIndex(){
        return iSelectedIndex;
    }
    
    public int getMin(){
        return iMin;
    }
    
    public int getMax(){
        return iMax;
    }
}

